Along with the development of mobile Internet technology, more and more people prefer browsing web pages through mobile terminal devices, enjoying the convenience of having the Internet in the pocket. However, due to the limit of hardware of mobile devices, the browsing effect of the browsers on mobile terminal devices falls far behind that of PC browsers. Furthermore, moving the web pages viewed on PC browsers to the browsers on mobile terminal devices will consume huge data traffic. Therefore, many browsers on mobile terminal devices have realized customization of web pages.
Generally, there are two major ways of customization of web pages by browsers:
1. Forward the request for a web page from a user's browser to the server of the browser's manufacturer, which in turn will obtain the data of the web page from the actual address of the web page, and customize the web page; and
2. Obtain the data of the web page in the normal way rather than through the transit and customization by the manufacturer's server; however, after obtaining the data of the web page, the browser will modify HTML Document Object Model (DOM) tree by inputting JavaScript (JS), JS language or through other means, so as to modify the display effect and functions of the web page, thus realizing the purpose of customization.
However, both methods for the purpose of customization have serious limitations and shortcomings. First of all, for the customization of web page through the manufacturer's server, some background servers must be established to maintain the function of customizing web pages, which will increase the cost of maintenance; moreover, the function of customizing web pages will be affected when the server breaks down. In addition, this mode of transit will also reduce the speed of opening web pages. Second, the modification of DOM tree through inputting JS or otherwise will damage the structure of DOM tree of the original web page, as a result of which the functions of web page, such as caching and saving the source code of the web page will be affected. Because the original web page has been modified, the DOM tree that has already been cached cannot be used when the web page is re-opened. As the process of saving the source code of the web page is actually a process of re-resolving the DOM tree into a character string, as a consequence of which the original functions of caching and saving the source code of the web page will no longer be effective. In addition, this mode of inputting JS or otherwise modifying DOM tree will be unable to block the advertisements controlled by web page JS after the customization. Finally, neither of the two methods of customizing web pages described above can realize seamless switch between entering and exiting from the mode of customization.